#!/usr/bin/env python
#coding:utf-8
# http://pyhook.sourceforge.net/doc_1.5.0/
"""监听鼠标点击"""

import pythoncom
import pyHook
def onMouseEvent(event):
    print "Position:", event.Position
    return True

def main():
    hm = pyHook.HookManager()
    hm.HookKeyboard()
    hm.MouseAllButtonsUp = onMouseEvent
    hm.HookMouse()
    pythoncom.PumpMessages()

if __name__ == "__main__":
    main()